<extend name="Index:base" />
<block name="title"><title>商品分类</title></block>
<block name="style">
 <style>
.main,.panel-default>.panel-heading{
background:none;
}
body{
background:none;
}
.panel.panel-default,.panel .panel-body,.panel .panel-heading,.table-bordered {
	border:none;
}
.table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
	border:none;		
	padding:15px;	
	line-height:8px;
	height: 8px;
	border-top: 1px solid #d4d4d4;
	border-bottom: 1px solid #d4d4d4;
}
.name strong{
color:#000000;
font-size:15px;
font-weight:600;
}
.name {
	color:#20a8d8;
	font-size:12px;
}
.smallfont {
	color:#9c9c9c;
	font-size:12px;
}

.align-center{
	text-align:center; 
}
.title2{
text-align:center;
}
.table-bordered > tbody > tr .wd{
	text-align:left;	
}

.col-xs-2,.col-xs-4{
padding-right:0;
margin:10px 0;
}
.col-sm-3{
width:10%;
}
.col-sm-2{
width:8%;
}
.col-sm-1{
width:5%;
}
.col-sm-4{
width:18%;
}
.col-sm-1,.col-sm-2{
margin:16px 0;
}
.col-sm-3,.col-sm-4{
margin:10px 0;
}
.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4{
padding-right:0;
}
 </style>
</block>
	<!-- start: Header -->
<block name="body">

			<!-- end: Main Menu -->
						
		<!-- start: Content -->
		<div class="main ">
		
			<div class="row">
				<div class="col-lg-12">
					<h3 class="page-header"><i class="fa fa-life-bouy"></i>分类管理</h3>
				</div>
			</div>

			<div class="row">
				<div class="col-md-12">
			        <div class="panel panel-default">
						<div class="panel-heading">
							
							<a class="btn btn-default " href="{:U('Goods/index')}" >管理</i></a>&nbsp;&nbsp;&nbsp;<h2><span class="break"></span><strong><in name="type" value="gc_add">新增</in><in name="type" value="gc_edit">编辑</in></strong></h2>
												
						</div>&nbsp;&nbsp;&nbsp;
						<div class="panel-body" style="width: 50%;">
							<form action="{:U('Goods/gc_add')}" method="post" enctype="multipart/form-data" class="form-horizontal ">
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="text-input"><font style="color:red;">*</font>&nbsp;&nbsp;分类名称:</label>
				                    <div class="col-md-9">
				                        <input type="text" id="gc_name" name="gc_name" class="form-control" value="{$gclist.gc_name}">
				                        <span class="help-block"></span>
				                    </div>
				                </div>
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="email-input">分类图片:</label>
				                    <div class="col-md-9">
				                        <input type="file" id="file-input" name="pic" >
										<span class="help-block">只有第一级分类可以上传图片，建议用16px * 16px，超出后自动隐藏</span>
				                    </div>
				                </div>
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="password-input"><font style="color:red;">*</font>&nbsp;&nbsp;分佣比例:</label>
				                    <div class="col-md-3">
				                        <input type="text" id="commis_rate" name="commis_rate" class="form-control" value="{$gclist.commis_rate}">
									</div>
				                        <span class="help-block"><span style="color:red;">%&nbsp;&nbsp;&nbsp;&nbsp;</span>必须为0-100的整数</span>
				                    
				                </div>
								<if condition="$gclist.gc_parent_id eq ''">
								<div class="form-group">
				                    <label class="col-md-3 control-label" for="select">上级分类:</label>
				                    <div class="col-md-9">
				                        <select id="gc_parent_id" name="gc_parent_id" class="form-control" size="1">
											<option value="0">请选择</option>
											
											<volist name="g_class" id="vo">
				                            <option value="{$vo.gc_id}">{$vo.gc_name}</option>
											</volist>
				                        </select><span class="help-block">如果选择上级分类，那么新增的分类则为被选择上级分类的子分类</span>
				                    </div>
				                </div>	
								</if>
				                <div class="form-group">
				                    <label class="col-md-3 control-label" for="select"><font style="color:red;">*</font>&nbsp;&nbsp;商城首页展示:</label>
				                    <div class="col-md-9">
				                        <select id="gc_show" name="gc_show" class="form-control" size="1">
										<if condition="$gclist.gc_show eq '0'">
											<option value="0">否</option>
				                            <option value="1">是</option>
										<elseif condition="$gclist.gc_show eq '1'"/>
											<option value="1">是</option>
											<option value="0">否</option>
										<else/>		
											<option value="0">否</option>
				                            <option value="1">是</option>	
										</if>
				                        </select>
										<span class="help-block">分类将在首页展示，最多可展示8层</span>
				                    </div>
									
<!-- 									<label class="col-md-3 control-label" for="select">&nbsp;</label>
				                    <div class="col-md-9">
				                        <div class="radio">
				                            <label for="radio1">
				                            <input type="radio" id="radio1" name="radios" value="option1"> Option 1
				                            </label>
				                        </div>
				                    </div> -->
				                </div>
						
								<div class="form-group">
									<label class="col-md-3 control-label" for="select">排序:</label>
				                    <div class="col-md-9">
				                        <input type="text" id="gc_sort" name="gc_sort" class="form-control" value="{$gclist.gc_sort}">
				                        <span class="help-block">	数字范围为0~255，数字越小越靠前</span>
				                    </div>
								</div>
								<br>
				            
						</div>
						<div class="panel-footer" style="border:none">
							<input type="hidden" id="type" name="type" value="{$type}"> 
							<input type="hidden" id="id" name="id" value="{$gclist.gc_id}">
		                    <button type="submit" class="btn btn-sm btn-success"><i class="fa fa-dot-circle-o"></i> 确定</button>
							&nbsp;&nbsp;&nbsp;
	                        <button type="reset" class="btn btn-sm btn-danger"><i class="fa fa-ban"></i> 重置</button>
		                </div>
					</form>						
			        </div>	
			    </div>			

			
			</div><!--/row				
			
		<!-- end: Content -->
		<br><br><br>
		
	</div><!--/container-->
	
</block>
<block name="script">
<script>

</script>
</block>	









